package com.ylp.sys.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 系统日志表
 * </p>
 *
 * @author ylp
 * @since 2024-07-19
 */
@TableName("sys_log")
@Schema(name = "SysLog", description = "系统日志表")
public class SysLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "日志类型")
    private String logType;

    @Schema(description = "创建时间")
    private LocalDateTime createDate;

    @Schema(description = "操作人员")
    private String operName;

    @Schema(description = "请求URI")
    private String requestUri;

    @Schema(description = "请求方式")
    private String requestType;

    @Schema(description = "请求参数")
    private String requestParams;

    @Schema(description = "请求IP")
    private String requestIp;

    @Schema(description = "请求地点")
    private String operLocation;

    @Schema(description = "返回参数")
    private String responseResult;

    @Schema(description = "操作状态（0正常1异常）")
    private Integer operStatus;

    @Schema(description = "异常信息")
    private String exceptionInfo;

    @Schema(description = "开始时间")
    private LocalDateTime startTime;

    @Schema(description = "结束时间")
    private LocalDateTime endTime;

    @Schema(description = "执行时间")
    private Long executeTime;

    @Schema(description = "用户代理")
    private String userAgent;

    @Schema(description = "操作系统")
    private String deviceName;

    @Schema(description = "浏览器名称")
    private String browserName;

    @Schema(description = "模块名")
    private String module;
    @Schema(description = "操作说明")
    private String operDesc;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLogType() {
        return logType;
    }

    public void setLogType(String logType) {
        this.logType = logType;
    }

    public LocalDateTime getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDateTime createDate) {
        this.createDate = createDate;
    }

    public String getOperName() {
        return operName;
    }

    public void setOperName(String operName) {
        this.operName = operName;
    }

    public String getRequestUri() {
        return requestUri;
    }

    public void setRequestUri(String requestUri) {
        this.requestUri = requestUri;
    }

    public String getRequestType() {
        return requestType;
    }

    public void setRequestType(String requestType) {
        this.requestType = requestType;
    }

    public String getRequestParams() {
        return requestParams;
    }

    public void setRequestParams(String requestParams) {
        this.requestParams = requestParams;
    }

    public String getRequestIp() {
        return requestIp;
    }

    public void setRequestIp(String requestIp) {
        this.requestIp = requestIp;
    }

    public String getOperLocation() {
        return operLocation;
    }

    public void setOperLocation(String operLocation) {
        this.operLocation = operLocation;
    }

    public String getResponseResult() {
        return responseResult;
    }

    public void setResponseResult(String responseResult) {
        this.responseResult = responseResult;
    }

    public Integer getOperStatus() {
        return operStatus;
    }

    public void setOperStatus(Integer operStatus) {
        this.operStatus = operStatus;
    }

    public String getExceptionInfo() {
        return exceptionInfo;
    }

    public void setExceptionInfo(String exceptionInfo) {
        this.exceptionInfo = exceptionInfo;
    }

    public LocalDateTime getStartTime() {
        return startTime;
    }

    public void setStartTime(LocalDateTime startTime) {
        this.startTime = startTime;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }

    public Long getExecuteTime() {
        return executeTime;
    }

    public void setExecuteTime(Long executeTime) {
        this.executeTime = executeTime;
    }

    public String getUserAgent() {
        return userAgent;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getBrowserName() {
        return browserName;
    }

    public void setBrowserName(String browserName) {
        this.browserName = browserName;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getOperDesc() {
        return operDesc;
    }

    public void setOperDesc(String operDesc) {
        this.operDesc = operDesc;
    }

    @Override
    public String toString() {
        return "SysLog{" +
            "id = " + id +
            ", logType = " + logType +
            ", createDate = " + createDate +
            ", operName = " + operName +
            ", requestUri = " + requestUri +
            ", requestType = " + requestType +
            ", requestParams = " + requestParams +
            ", requestIp = " + requestIp +
            ", operLocation = " + operLocation +
            ", responseResult = " + responseResult +
            ", operStatus = " + operStatus +
            ", exceptionInfo = " + exceptionInfo +
            ", startTime = " + startTime +
            ", endTime = " + endTime +
            ", executeTime = " + executeTime +
            ", userAgent = " + userAgent +
            ", deviceName = " + deviceName +
            ", browserName = " + browserName +
        "}";
    }
}
